package com.pbd.shared;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@Entity
@Table(name="leadmaster")
public class LEADMASTER implements Serializable{
	
	public LEADMASTER(){
		
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "leadId")
	private Long leadId;
	
	@Column(name = "leadCode", nullable = true, length = 20)
	private String leadCode;
	
	@Column(name = "leadDesc", nullable = true, length = 200)
	private String leadDesc;
	
	@Column(name = "createdDate")
	private java.util.Date createdDate;
	
	@Column(name = "updatedDate")
	private java.util.Date updatedDate;
	
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name = "leadPartyId", referencedColumnName="partyId",insertable = false, updatable = false)
	private PARTY leadParty;
	
	@Column(name = "leadSource", nullable = true, length = 20)
	private String leadSource;
	
	@Column(name = "leadStatus", nullable = true, length = 20)
	private String leadStatus;
	
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name = "createdById", referencedColumnName="partyId",insertable = false, updatable = false)
	private PARTY createdBy;

	public Long getLeadId() {
		return leadId;
	}

	public void setLeadId(Long leadId) {
		this.leadId = leadId;
	}

	public String getLeadCode() {
		return leadCode;
	}

	public void setLeadCode(String leadCode) {
		this.leadCode = leadCode;
	}

	public String getLeadDesc() {
		return leadDesc;
	}

	public void setLeadDesc(String leadDesc) {
		this.leadDesc = leadDesc;
	}

	public java.util.Date getCreatedDate() {
		return createdDate;
	}

	public void setCreatedDate(java.util.Date createdDate) {
		this.createdDate = createdDate;
	}

	public java.util.Date getUpdatedDate() {
		return updatedDate;
	}

	public void setUpdatedDate(java.util.Date updatedDate) {
		this.updatedDate = updatedDate;
	}

	public PARTY getLeadParty() {
		return leadParty;
	}

	public void setLeadParty(PARTY leadParty) {
		this.leadParty = leadParty;
	}

	public String getLeadSource() {
		return leadSource;
	}

	public void setLeadSource(String leadSource) {
		this.leadSource = leadSource;
	}

	public String getLeadStatus() {
		return leadStatus;
	}

	public void setLeadStatus(String leadStatus) {
		this.leadStatus = leadStatus;
	}

	public PARTY getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(PARTY createdBy) {
		this.createdBy = createdBy;
	}
	
	

}
